//
//  YbrChannelManage.m
//  wifibox
//
//  Created by os X 10.9 on 14-11-13.
//  Copyright (c) 2014年 yinbaner. All rights reserved.
//

#import "YbrChannelManage.h"
#import "YbrChannelItem.h"
#import "YbrChannelDao.h"

@implementation YbrChannelManage

-(void) InitDB {
    
    YbrChannelDao *dao = [[YbrChannelDao alloc] init];
    [dao clearDb:0];
    [dao clearDb:1];
    
    [dao addCache:[self InitCourseChooseChannel] type:0 userSort:YES];
    [dao addCache:[self InitCourseNoChooseChannel] type:0 userSort:YES];
    [dao addCache:[self InitMusicChooseChannel] type:1 userSort:YES];
    [dao addCache:[self InitMusicNoChooseChannel] type:1 userSort:YES];
}

// 初始化音乐选择的频道
-(NSArray *) InitMusicChooseChannel {
    NSMutableArray *arr = [NSMutableArray array];
    
    [arr addObject:[[YbrChannelItem alloc] initWithCode:2 name:@"励志" course_type:2 orderId:1 selected:YES]];
    [arr addObject:[[YbrChannelItem alloc] initWithCode:3 name:@"快乐" course_type:2 orderId:2 selected:YES]];
    [arr addObject:[[YbrChannelItem alloc] initWithCode:4 name:@"神曲" course_type:2 orderId:3 selected:YES]];
    [arr addObject:[[YbrChannelItem alloc] initWithCode:5 name:@"童年" course_type:2 orderId:4 selected:YES]];
    [arr addObject:[[YbrChannelItem alloc] initWithCode:6 name:@"青春" course_type:2 orderId:5 selected:YES]];
    [arr addObject:[[YbrChannelItem alloc] initWithCode:7 name:@"幸福" course_type:2 orderId:6 selected:YES]];
    [arr addObject:[[YbrChannelItem alloc] initWithCode:8 name:@"梦想" course_type:2 orderId:7 selected:YES]];
    
    return arr;
}

// 初始化没有选择的频道
-(NSArray *) InitMusicNoChooseChannel {
    NSMutableArray *arr = [NSMutableArray array];
    
    [arr addObject:[[YbrChannelItem alloc] initWithCode:9 name:@"放松" course_type:2  orderId:1 selected:NO]];
    [arr addObject:[[YbrChannelItem alloc] initWithCode:10 name:@"甜蜜" course_type:2 orderId:2 selected:NO]];
    [arr addObject:[[YbrChannelItem alloc] initWithCode:11 name:@"轻音乐" course_type:2 orderId:3 selected:NO]];
    [arr addObject:[[YbrChannelItem alloc] initWithCode:12 name:@"安静" course_type:2 orderId:4 selected:NO]];
    
    return arr;
}

// 初始化课程选择的频道
-(NSArray *) InitCourseChooseChannel {
    NSMutableArray *arr = [NSMutableArray array];

    [arr addObject:[[YbrChannelItem alloc] initWithCode:18 name:@"诗词" course_type:1 orderId:1 selected:YES]];
    [arr addObject:[[YbrChannelItem alloc] initWithCode:19 name:@"胎教" course_type:1 orderId:2 selected:YES]];
    [arr addObject:[[YbrChannelItem alloc] initWithCode:28 name:@"语文" course_type:1 orderId:3 selected:YES]];
    [arr addObject:[[YbrChannelItem alloc] initWithCode:29 name:@"英语" course_type:3 orderId:4 selected:YES]];
    [arr addObject:[[YbrChannelItem alloc] initWithCode:20 name:@"少儿英语" course_type:1 orderId:5 selected:YES]];
    [arr addObject:[[YbrChannelItem alloc] initWithCode:21 name:@"故事" course_type:1 orderId:6 selected:YES]];
    
    return arr;
}

// 初始化没有选择的频道
-(NSArray *) InitCourseNoChooseChannel {
    NSMutableArray *arr = [NSMutableArray array];
    
    [arr addObject:[[YbrChannelItem alloc] initWithCode:22 name:@"儿歌" course_type:1 orderId:1 selected:NO]];
    [arr addObject:[[YbrChannelItem alloc] initWithCode:24 name:@"智力开发" course_type:1 orderId:2 selected:NO]];
    
    return arr;
}

// 初始化录音背景音乐
-(NSArray *) InitRecordBackgroudMusic {
    NSMutableArray *arr = [NSMutableArray array];
    
    
    
    
    
    //[arr addObject:[[YbrChannelItem alloc] initWithCode:22 name:@"儿歌" course_type:1 orderId:1 selected:NO]];
    //[arr addObject:[[YbrChannelItem alloc] initWithCode:24 name:@"智力开发" course_type:1 orderId:2 selected:NO]];
    
    return arr;
}





@end
